/*
 * @Author: 霍格沃兹测试开发学社
 * @Desc: '更多测试开发技术探讨，请访问：https://ceshiren.com/t/topic/15860'
 */

package com.ceshiren.aitestmini.converter;


import com.ceshiren.aitestmini.dto.HogwartsTestUserDTO;
import com.ceshiren.aitestmini.entity.HogwartsTestUser;
import org.mapstruct.AfterMapping;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;


@Mapper(componentModel = "spring")
public interface HogwartsTestUserConverter {
//    hogwartsTestUserDTO---->  HogwartsTestUser

    @Mappings({
            @Mapping(target = "userName",source = "userName"),
            @Mapping(target = "password",source = "password"),
            @Mapping(target = "email",source = "email")
    })
    HogwartsTestUser userDTOForUser(HogwartsTestUserDTO hogwartsTestUserDTO);


}
